import request from './request.js'

const user = {
	//登录
	login(data) {
		return request.post('/api/v1/pub/login', data)
	},
	//获取用户信息
	getUserInfo(data){
		return request.get(`/api/v1/agent/getAgentInfo`,{
			data
		})
	},
	//修改用户信息
	updateUserInfo(data) {
		return request.post('/api/v1/agent/editAgentInfo', data)
	},
	//修改密码
	updateUserPwd(data) {
		return request.post('/api/v1/agent/editAgentPassword', data)
	},
	//获取可结算周期
	getSettlementCycle(data) {
		return request.get('/api/v1/agent/getSettlementCycle', {data})
	},
	//提现申请
	withdrawal(data) {
		return request.get('/api/v1/agent/withdrawal', {data})
	},
	newWithdrawal(data) {
		return request.get('/api/v1/agent/newWithdrawal', {data})
	},
	//收益
	getIncome(data) {
		return request.get('/api/v1/agent/getIncome', {data})
	},
	withdrawalRecode(data) {
		return request.get('/api/v1/agent/withdrawalRecode', {data})
	},
	//收货地址
	getAddressList() {
		return request.get('/api/v1/Inventory/getAddressList')
	},
	//修改地址
	editAddress(data) {
		return request.post('/api/v1/Inventory/address', data)
	},
	//删除地址
	delAddress(data) {
		return request.post('/api/v1/Inventory/delAddress', data)
	}
}
export default user
